import numpy as np
import torch
import torch.nn as nn
import torch.nn.functional as F
import math

from network.resnet100 import *

__weights_dict = dict()

class sexdiscrimination(KitModel):
    def __init__(self, weight_file):
        # super(sexdiscrimination, self,weight_file).__init__()
        super(sexdiscrimination,self).__init__(weight_file)
        # super.__init__()
        # __weights_dict = load_weights(weight_file)
        self.sex_fc1=nn.Linear(512,256)
        self.sex_fc2 = nn.Linear(256, 128)
        self.sex_fc3 = nn.Linear(128, 64)
        self.sex_fc4 = nn.Linear(64, 32)
        self.sex_fc5 = nn.Linear(32, 16)
        self.sex_fc6 = nn.Linear(16, 8)
        self.sex_fc7 = nn.Linear(8, 4)
        self.sex_fc8 = nn.Linear(4, 2)



    def forward(self, x):
        t=KitModel.forward(self,x)
        t=self.sex_fc1(t)
        t = self.sex_fc2(t)
        t = self.sex_fc3(t)
        t = self.sex_fc4(t)
        t = self.sex_fc5(t)
        t = self.sex_fc6(t)
        t = self.sex_fc7(t)
        t = self.sex_fc8(t)
        return t;